<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>支付设置</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  
    {include file="public/css"}
    {include file="public/js"}
</head>
<body>

<!-- 后台面包导航 -->
{:get_admin_breadcrumb()}

<blockquote class="layui-elem-quote" style="margin-top:10px;">说明：配置前请到对应接口网站申请支付接口账号</blockquote>

<form class="layui-form" action="">
  <div class="layui-tab layui-tab-brief">
    <ul class="layui-tab-title">
      <li class="layui-this">支付宝</li>
    </ul>


 <div class="layui-tab-content">
      <input type="hidden"  name="groupname" value="{$Request.action}">


      <div class="layui-tab-item layui-show"> 
          <div class="layui-form-item">
              <label class="layui-form-label">支付宝状态： </label>
              <div class="layui-input-block">
                <input type="radio" name="data[alipay_status]" value="1" {if $settings.pay.alipay_status ==1}checked{/if} title="开启" checked="">
                <input type="radio" name="data[alipay_status]" value="0" {if $settings.pay.alipay_status ==0}checked{/if} title="关闭">
              </div>
            </div>              


            <div class="layui-form-item">
            <label class="layui-form-label">应用ID：</label>
            <div class="layui-input-inline">
              <input type="text" name="data[alipay_app_id]" lay-verify="alipay_app_id" placeholder="" autocomplete="off" class="layui-input" value="{$settings.pay.alipay_app_id}">
            </div>
            <div class="layui-form-mid layui-word-aux"><a href="https://b.alipay.com/signing/productDetail.htm?productId=I1011000290000001000" target="_blank">申请接口</a></div>
          </div>

            <div class="layui-form-item">
            <label class="layui-form-label">商户私钥： </label>
            <div class="layui-input-inline">
              <input type="password" name="data[alipay_merchant_private_key]" lay-verify="alipay_merchant_private_key" placeholder="" autocomplete="off" class="layui-input" value="{$settings.pay.alipay_merchant_private_key}">
            </div>
            <div class="layui-form-mid layui-word-aux"></div>
          </div>

             <div class="layui-form-item">
            <label class="layui-form-label">支付宝公钥： </label>
            <div class="layui-input-inline">
              <input type="password" name="data[alipay_public_key]" lay-verify="alipay_public_key" placeholder="" autocomplete="off" class="layui-input" value="{$settings.pay.alipay_public_key}">
            </div>
            <div class="layui-form-mid layui-word-aux">支付宝公钥,查看地址：https://openhome.alipay.com/platform/keyManage.htm 对应APPID下的支付宝公钥。</div>
          </div>  

            <div class="layui-form-item">
            <label class="layui-form-label">同步跳转地址：  </label>
            <div class="layui-input-inline">
                <div class="layui-form-mid">{$Request.domain}/user/alipay/returnUrl</div>
              
            </div>
            <div class="layui-form-mid layui-word-aux"></div>
          </div>
          <div class="layui-form-item">
              <label class="layui-form-label">异步通知地址： </label>
              <div class="layui-input-inline">
                  <div class="layui-form-mid">{$Request.domain}/user/alipay/notifyUrl</div>
                
              </div>
              <div class="layui-form-mid layui-word-aux"></div>
            </div>



      </div>
     
   


                     <div class="layui-form-item">
                        <label class="layui-form-label"></label>
                          <div class="layui-input-block">
                              <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="form">确 定</button>
                          </div>
                        </div>
      </div>

  </div>

</form>




    


<script>
layui.use('form', function(){
  var form = layui.form;
  
  //监听提交
  form.on('submit(form)', function(data){
    // layer.msg(JSON.stringify(data.field));
    var data =data.field;
    $.post("{:url('settings/update')}",data,function(json){
       if(json.code == 0){
           layer.msg(json.msg);
       }else if(json.code == -1){
           layer.msg(json.msg);
       }
    });
    return false;
  });
});
</script>

</script>

</body>

</html>